home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 139 / cd-rom 139.iso / capa / mcoder / MediaCoder-0.5.1-r3.exe / htdocs / pref / main.js < prev    next >
Encoding:
Text File  |  2006-06-19  |  463 b   |  26 lines

  1. function onPageLoad()
  2. {
  3.     window.resizeTo(800, 600);
  4. }
  5.  
  6. function GetToken(str, token, delimiter)
  7. {
  8.     var idx = str.indexOf(token + '=');
  9.     var argstr = str.substring(idx + token.length + 1);
  10.     idx = argstr.indexOf(delimiter);
  11.     return idx >=0 ? argstr.substring(0, idx) : argstr;
  12. }
  13.  
  14. function onButtonClick(index)
  15. {
  16.     switch (index) {
  17.     case 0:
  18.         alert("hello");
  19.         window.location = "page2.htm";
  20.         break;
  21.     case 1:
  22.         alert("world");
  23.         break;
  24.     }
  25. }
  26.